<div class="vheader">
    <h1><?php echo $this->Banks->d->Name ?></h1>
    <p><?php echo $this->translate("Bank") ?>
</div>

<div class="vcontent">
<div id="cell-2" style="width: 350px;">
    <dl>
        <dt><?php echo $this->translate("Name") ?></dt>
        <dd><?php echo $this->Banks->d->Name ?></dd>
        <dt><?php echo $this->translate("Code") ?></dt>
        <dd><?php echo $this->Banks->d->BankId ?></dd>
        <dt><?php echo $this->translate("Status") ?></dt>
        <dd><?php echo $this->replaceEmpty($this->Banks->d->OfficerUsername,$this->translate("Inactive"),$this->translate("Active")) ?></dd>
        <dt><?php echo $this->translate("Loan officer") ?></dt>
        <dd><?php echo $this->replaceEmpty($this->Banks->d->OfficerFullName,'-') ?></dd>
        <dt><?php echo $this->translate("Branch") ?></dt>
        <dd><?php echo $this->replaceEmpty($this->Banks->d->Location,'-') ?></dd>
        <dt><?php echo $this->translate("Comments") ?></dt>
        <dd><?php echo $this->replaceEmpty($this->Banks->d->Comments,'-') ?></dd>
    </dl>
</div>

<div id="cell-4">
</div>

</div>    
    
<!-- Tooltips -->
<div data-dojo-type="dijit.Tooltip" data-dojo-props="connectId:'bank',position:['below']">
    <?php echo $this->translate("Edit bank data") ?>
</div>
<!-- Tooltips /-->


<script type="text/javascript">
    window.onload = function() {
        var group = document.getElementById('Group');
        group.onchange = function () {  client(group.value); return false; }    
    };
    function client(gid)
    {
        dojo.xhrGet({
            url: "/admin/json/get-group-client-options/id/" + gid,
            handleAs: "json",
            timeout: 5000,
            load: function(response, ioArgs) {                
                var cli = dojo.byId('Client');
                cli.options.length = 0;                
                for (index = 0; index < response.length; ++index) {
                    option = response[index];
                    cli.options.add(new Option(option.oT, option.oV));
                }                
                return response;
            },
            error: function(response, ioArgs) {
                //alert('Failed xhrGet');
                return response;
            }
        });
    }
</script>